﻿using System;
using System.Collections.Generic;
using System.Text;
using KKCai.HNKL.Model;

namespace KKCai.HNKL
{
    public class GlobalData
    {
        public static int CurrentID 
        {
            get {
                return LastRecord.ID;
            } 
        }
        public static HNKLInfo LastRecord { get; private set; }


        private GlobalData() { }
        static GlobalData()
        {
            Refresh();
        }

        public static void Refresh()
        {
            LastRecord = new DAL.HNKLDao().Order("id",false,1)[0];
        }

        public static void Refresh(HNKLInfo record)
        {
            LastRecord = record;
        }
    }
}
